<template>
    <el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto"
        class="demo-ruleForm" :size="formSize" status-icon>
        <el-form-item label="用户名称" prop="username">
            <el-input v-model="ruleForm.username" />
        </el-form-item>
        <el-form-item label="用户昵称" prop="name">
            <el-input v-model="ruleForm.name" />
        </el-form-item>
        <el-form-item label="部门" prop="type">
            <el-input v-model="ruleForm.type" />
        </el-form-item>
        <el-form-item label="手机号" prop="tel">
            <el-input v-model="ruleForm.tel" />
        </el-form-item>
        <el-form-item label="岗位状态" prop="">
            <el-switch v-model="ruleForm.status" :active-value="1" :inactive-value="2" />
        </el-form-item>
        <el-form-item label="备注" prop="desc">
            <el-input type="textarea" />
        </el-form-item>
        <el-form-item style="display: flex;flex-direction: column;">
            <el-button @click="offalert">
                取消
            </el-button>
            <el-button type="primary" @click="submitForm(ruleFormRef)">
                确认
            </el-button>
        </el-form-item>
    </el-form>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import type { FormInstance } from 'element-plus'
const ruleFormRef = ref<FormInstance>()
defineProps(['ruleForm', 'rules', 'formSize', 'submitForm', 'offalert'])

</script>